home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Day Cry
/
Day Cry CD.bin
/
oh_towns
/
ugoku
/
src.lzh
/
MOVREC
/
MRCXSUB.C
< prev
next >
Wrap
Text File
|
1994-09-08
|
22KB
|
950 lines
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <winb.h>
#include <te.h>
#include <fntb.h>
#include <gui.h>
#include <file_dlg.h>
#include <egb.h>
#include <mos.h>
#include <snd.h>
#include "ugoku.h"
#include "mrcdef.h"
extern char *guiEgbPtr ; /* EGB é╠âÅü[âNâAâhâîâX */
/* dsk */
int baseDialogId = -1 ;
int menubarId = -1 ;
int menuId = -1 ;
int mItemId[2] = -1 ;
int SDKmenuId = -1 ;
int SDKmItemId[3] = -1 ;
int fileMenuId = -1 ;
int fileMItemId[13] = -1 ;
int quitIconId = -1 ;
int wakuDialogId = -1 ;
int wakuDialogId2 = -1 ;
/* dsk2 */
int baseDialogId2 = -1 ;
int base2BtnId[10] = -1 ;
int baseDialogId3 = -1 ;
int baseDialogId4 = -1 ;
int base2MesId[30] = -1 ;
int baseInputMesId[2] = -1 ;
/* abou */
int alertId = -1 ;
int messageId[3] = -1 ;
int dspIconId = -1 ;
int aboutOKBtnId = -1 ;
/* err */
int errorId = -1 ;
int errorOKBtnId = -1 ;
int errorIconId = -1 ;
int errormessage[2] = -1 ;
char *rbuf; /* ö─ùpbuffer */
char *bbuf;
char movPath[80] ;
char tifPath[80] ;
char tifName[ F_MAX ][16] ;
int tifTotal ;
/*
èεû{âïü[â`âô
*/
/* input mov file */
/* initDataIRCDSK:fileMItemId[0]:MJ_MITEML40é╠î─é╤Åoé╡è╓Éö */
/* initDataIRCDSK2:base2BtnId[0]:MJ_DBUTTONL40é╠î─é╤Åoé╡è╓Éö */
int selectFunc0(kobj, messId, argc, pev, trigger)
int kobj ;
int messId ;
int argc ;
EVENT *pev ;
int trigger ;
{
char *ExtStr[] = { "*.MOV", NULL } ;
char path[100] ;
int i, ret, error ;
/* âüâjâàü[é╞â{â^âôé≡Ägéªé╚éóéµéñé╔é╖éΘ */
MTL_setAtrObj( baseDialogId, MS_DSPONLYL40 ) ;
MTL_setAtrObj( SDKmItemId[2], MS_INACTIVEL40 ) ;
error = 0 ;
ret = fileSelector(movPath, ExtStr,
"élénéuâtâ@âCâï", "É▌ ÆΦ", "ĵ Å┴");
if( ret )
goto v10 ;
else
{
/* name , kakuchou[ègÆúÄq(.***)] ü¿ fullname = name + kakuchou */
error = file_kakuchousi_set( path, movPath, ".MOV" ) ;
if( error == NOERR )
{
for( i=0 ; i<80 ; i++ )
movPath[i] = path[i] ;
}
}
if( error == NOERR )
{
MMI_SendMessage( baseInputMesId[0], MM_SETMSG, 1, movPath ) ;
MMI_SendMessage( baseDialogId3, MM_SHOW, 0 ) ; /* movfileû╝é≡î⌐é╣éΘ */
}
v10:
/* âüâjâàü[é╞â{â^âôé≡ÄgéªéΘéµéñé╔û▀é╖ */
MTL_resetAtrObj( baseDialogId, (~MS_DSPONLYL40) ) ;
MTL_resetAtrObj( SDKmItemId[2], (~MS_INACTIVEL40) ) ;
if( error )
errorCheck( error ) ;
return NOERR ;
}
/* tiff directory */
/* initDataIRCDSK:fileMItemId[2]:MJ_MITEML40é╠î─é╤Åoé╡è╓Éö */
/* initDataIRCDSK2:base2BtnId[1]:MJ_DBUTTONL40é╠î─é╤Åoé╡è╓Éö */
int selectFunc1(kobj, messId, argc, pev, trigger)
int kobj ;
int messId ;
int argc ;
EVENT *pev ;
int trigger ;
{
extern int tifFirstFlg ;
char *ExtStr[] = { "*.TIF", NULL } ;
int ret, error ;
/* âüâjâàü[é╞â{â^âôé≡Ägéªé╚éóéµéñé╔é╖éΘ */
MTL_setAtrObj( baseDialogId, MS_DSPONLYL40 ) ;
MTL_setAtrObj( SDKmItemId[2], MS_INACTIVEL40 ) ;
error = 0 ;
ret = directorySelector(tifPath, "dummy.tif", ExtStr,
"âfâBâîâNâgâè", "Äw ÆΦ", "ĵ Å┴");
if( ret )
goto v10 ;
if( error == NOERR )
{
char static name[100] ;
int i ;
tifFirstFlg = 0 ; /* tiff editor âèâtâîâbâVâà */
for( i=0 ; i<80 ; i++ )
{
name[i] = tifPath[i] ;
if( name[i] == '\0' )break ;
}
if( i>40 ) /* tifPathé¬Æ╖é╖é¼é╜é╞é½é╠Åêù¥ */
{
name[i-40] = 'Ñ' ;
name[i-39] = 'Ñ' ;
name[i-38] = 'Ñ' ;
name[i-37] = 'Ñ' ;
name[i-36] = 'Ñ' ;
MMI_SendMessage( baseInputMesId[1], MM_SETMSG, 1, name+i-40 ) ;
}
else
MMI_SendMessage( baseInputMesId[1], MM_SETMSG, 1, tifPath ) ;
MMI_SendMessage( baseDialogId4, MM_SHOW, 0 ) ; /* TIFfileû╝é≡î⌐é╣éΘ */
}
v10:
/* âüâjâàü[é╞â{â^âôé≡ÄgéªéΘéµéñé╔û▀é╖ */
MTL_resetAtrObj( baseDialogId, (~MS_DSPONLYL40) ) ;
MTL_resetAtrObj( SDKmItemId[2], (~MS_INACTIVEL40) ) ;
if( error )
errorCheck( error ) ;
return NOERR ;
}
/* tif edit */
/* initDataIRCDSK:fileMItemId[3]:MJ_MITEML40é╠î─é╤Åoé╡è╓Éö */
/* initDataIRCDSK2:base2BtnId[2]:MJ_DBUTTONL40é╠î─é╤Åoé╡è╓Éö */
int selectFunc2(kobj, messId, argc, pev, trigger)
int kobj ;
int messId ;
int argc ;
EVENT *pev ;
int trigger ;
{
extern int tifFileEdit( char * ) ;
/* âüâjâàü[é╞â{â^âôé≡Ägéªé╚éóéµéñé╔é╖éΘ */
MTL_setAtrObj( menubarId, MS_DSPONLYL40 ) ;
MTL_setAtrObj( SDKmItemId[2], MS_INACTIVEL40 ) ;
MMI_SendMessage( baseDialogId2, MM_ERASE, 0 ) ;
MMI_SendMessage( baseDialogId2, MM_DETACH, 0 ) ;
tifFileEdit( tifPath ) ;
MMI_SendMessage( baseDialogId2, MM_ATTACH, 1, baseDialogId ) ;
MMI_SendMessage( baseDialogId2, MM_SHOW, 0 ) ; /* î⌐é╣éΘ */
/* âüâjâàü[é╞â{â^âôé≡ÄgéªéΘéµéñé╔û▀é╖ */
MTL_resetAtrObj( menubarId, (~MS_DSPONLYL40) ) ;
MTL_resetAtrObj( SDKmItemId[2], (~MS_INACTIVEL40) ) ;
return NOERR ;
}
/* video in */
/* initDataIRCDSK:fileMItemId[4]:MJ_MITEML40é╠î─é╤Åoé╡è╓Éö */
/* initDataIRCDSK2:base2BtnId[3]:MJ_DBUTTONL40é╠î─é╤Åoé╡è╓Éö */
int selectFunc3(kobj, messId, argc, pev, trigger)
int kobj ;
int messId ;
int argc ;
EVENT *pev ;
int trigger ;
{
extern int videoToTiff( char *, char b[][16] ) ;
/* âüâjâàü[é╞â{â^âôé≡Ägéªé╚éóéµéñé╔é╖éΘ */
MTL_setAtrObj( menubarId, MS_DSPONLYL40 ) ;
MTL_setAtrObj( SDKmItemId[2], MS_INACTIVEL40 ) ;
MMI_SendMessage( baseDialogId2, MM_ERASE, 0 ) ;
MMI_SendMessage( baseDialogId2, MM_DETACH, 0 ) ;
videoToTiff( tifPath, tifName ) ;
MMI_SendMessage( baseDialogId2, MM_ATTACH, 1, baseDialogId ) ;
MMI_SendMessage( baseDialogId2, MM_SHOW, 0 ) ; /* î⌐é╣éΘ */
/* âüâjâàü[é╞â{â^âôé≡ÄgéªéΘéµéñé╔û▀é╖ */
MTL_resetAtrObj( menubarId, (~MS_DSPONLYL40) ) ;
MTL_resetAtrObj( SDKmItemId[2], (~MS_INACTIVEL40) ) ;
return NOERR ;
}
/* tiff check */
/* initDataIRCDSK:fileMItemId[5]:MJ_MITEML40é╠î─é╤Åoé╡è╓Éö */
/* initDataIRCDSK2:base2BtnId[4]:MJ_DBUTTONL40é╠î─é╤Åoé╡è╓Éö */
int selectFunc4(kobj, messId, argc, pev, trigger)
int kobj ;
int messId ;
int argc ;
EVENT *pev ;
int trigger ;
{
extern int tiff_files_check( char *, int, char b[][16], int, int ) ;
/* âüâjâàü[é╞â{â^âôé≡Ägéªé╚éóéµéñé╔é╖éΘ */
MTL_setAtrObj( menubarId, MS_DSPONLYL40 ) ;
MTL_setAtrObj( SDKmItemId[2], MS_INACTIVEL40 ) ;
MMI_SendMessage( baseDialogId2, MM_ERASE, 0 ) ;
MMI_SendMessage( baseDialogId2, MM_DETACH, 0 ) ;
tiff_files_check( tifPath, tifTotal, tifName, 0, tifTotal-1 ) ;
MMI_SendMessage( baseDialogId2, MM_ATTACH, 1, baseDialogId ) ;
MMI_SendMessage( baseDialogId2, MM_SHOW, 0 ) ; /* î⌐é╣éΘ */
/* âüâjâàü[é╞â{â^âôé≡ÄgéªéΘéµéñé╔û▀é╖ */
MTL_resetAtrObj( menubarId, (~MS_DSPONLYL40) ) ;
MTL_resetAtrObj( SDKmItemId[2], (~MS_INACTIVEL40) ) ;
return NOERR ;
}
/* ÉVïK */
/* initDataIRCDSK:fileMItemId[7]:MJ_MITEML40é╠î─é╤Åoé╡è╓Éö */
/* initDataIRCDSK2:base2BtnId[5]:MJ_DBUTTONL40é╠î─é╤Åoé╡è╓Éö */
int selectFunc5(kobj, messId, argc, pev, trigger)
int kobj ;
int messId ;
int argc ;
EVENT *pev ;
int trigger ;
{
extern int tifToMov( char *, char *, int, char [][16] ) ;
/* âüâjâàü[é╞â{â^âôé≡Ägéªé╚éóéµéñé╔é╖éΘ */
MTL_setAtrObj( menubarId, MS_DSPONLYL40 ) ;
MTL_setAtrObj( SDKmItemId[2], MS_INACTIVEL40 ) ;
MMI_SendMessage( baseDialogId2, MM_ERASE, 0 ) ;
MMI_SendMessage( baseDialogId2, MM_DETACH, 0 ) ;
tifToMov( movPath, tifPath, tifTotal, tifName ) ;
MMI_SendMessage( baseDialogId2, MM_ATTACH, 1, baseDialogId ) ;
MMI_SendMessage( baseDialogId2, MM_SHOW, 0 ) ; /* î⌐é╣éΘ */
/* âüâjâàü[é╞â{â^âôé≡ÄgéªéΘéµéñé╔û▀é╖ */
MTL_resetAtrObj( menubarId, (~MS_DSPONLYL40) ) ;
MTL_resetAtrObj( SDKmItemId[2], (~MS_INACTIVEL40) ) ;
return NOERR ;
}
/* Æ╟ë┴ */
/* initDataIRCDSK:fileMItemId[8]:MJ_MITEML40é╠î─é╤Åoé╡è╓Éö */
/* initDataIRCDSK2:base2BtnId[6]:MJ_DBUTTONL40é╠î─é╤Åoé╡è╓Éö */
int selectFunc6(kobj, messId, argc, pev, trigger)
int kobj ;
int messId ;
int argc ;
EVENT *pev ;
int trigger ;
{
extern int tifToMovAdd( char *, char *, int, char [][16] ) ;
/* âüâjâàü[é╞â{â^âôé≡Ägéªé╚éóéµéñé╔é╖éΘ */
MTL_setAtrObj( menubarId, MS_DSPONLYL40 ) ;
MTL_setAtrObj( SDKmItemId[2], MS_INACTIVEL40 ) ;
MMI_SendMessage( baseDialogId2, MM_ERASE, 0 ) ;
MMI_SendMessage( baseDialogId2, MM_DETACH, 0 ) ;
tifToMovAdd( movPath, tifPath, tifTotal, tifNam